package com.slcf.common;

import com.slcf.controller.vo.ResultVO;

public enum ErrorEnum {
	SUCCESS("10000","成功"),
	NICKNAME_NULL("10001","用户昵称不允许为空"),
	NICKNAME_LENGTH_ERROR("10002","用户昵称长度为30个字符以内"),
	GUESSNAME_NULL("10003","英雄名称不允许为空"),
	GUESSNAME_LENGTH_ERROR("10004","英雄名称长度为4个字符以内"),
	HERONAME_GUESS_ERROR("10005","英雄名称错误"),
	IS_NOT_NULL("90001","参数不允许为空"),
	ERROR("99999","系统内部错误");
	
	
	
	/**
	 * 错误码
	 */
	private String code;
	/**
	 * 错误描述
	 */
	private String message;
	
	private ErrorEnum (String code, String message) {
		this.code = code;
		this.message = message;
	}
	
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	
	public ResultVO getResult() {
		return new ResultVO(code, message);
	}
	
}
